<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
    <style>
        [v-cloak]{
            display: none;
        }
        .box{
            width: 200px;
            height: 200px;
            background-color: papayawhip;
        }


      
    </style>
</head>
<body>
    <div id="app" v-cloak>
        <button @click="flag=!flag">点击</button>
        <transition appear appear-active-class="animate__animated animate__bounceIn animate__slower"
        enter-active-class="animate__animated animate__bounceIn animate__slower"
        leave-active-class="animate__animated animate__bounceOut animate__slower">
        <!-- animate__hinge:翻转 -->

            <div class="box" v-if="flag"></div>
        </transition>
        
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                flag: true
            }
        })
    </script>
</body>
</html>